package com.yytek.am.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;

/**
 * 告警生成规则定义对象 fm_rule_generate
 * 
 * @author yytek-iot
 * @date 2022-10-10
 */
@ApiModel("告警生成规则定义对象")
public class FmRuleGenerate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @ApiModelProperty("id")
    private Long id;

    /** 告警定义ID */
    @Excel(name = "告警定义ID")
    @ApiModelProperty("告警定义ID")
    private Long alarmDefineId;

    /** 累计次数  产生告警的判定依据之一(连续几次满足条件，则产生告警消息记录) */
    @Excel(name = "累计次数  产生告警的判定依据之一(连续几次满足条件，则产生告警消息记录)")
    @ApiModelProperty("累计次数  产生告警的判定依据之一(连续几次满足条件，则产生告警消息记录)")
    private Long accCount;

    /** 累计时间(毫秒数) */
    @Excel(name = "累计时间(毫秒数)")
    @ApiModelProperty("累计时间(毫秒数)")
    private Long accTime;

    /** 规则判定表达式
     Double.valueOf(#map[kpiValue].toString()) > 70 */
    @Excel(name = "规则判定表达式")
    @ApiModelProperty("规则判定表达式")
    private String calculateExpress;

    /** 操作人 */
    @Excel(name = "操作人")
    @ApiModelProperty("操作人")
    private String operator;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setAlarmDefineId(Long alarmDefineId) 
    {
        this.alarmDefineId = alarmDefineId;
    }

    public Long getAlarmDefineId() 
    {
        return alarmDefineId;
    }
    public void setAccCount(Long accCount) 
    {
        this.accCount = accCount;
    }

    public Long getAccCount() 
    {
        return accCount;
    }
    public void setAccTime(Long accTime) 
    {
        this.accTime = accTime;
    }

    public Long getAccTime() 
    {
        return accTime;
    }
    public void setCalculateExpress(String calculateExpress) 
    {
        this.calculateExpress = calculateExpress;
    }

    public String getCalculateExpress() 
    {
        return calculateExpress;
    }
    public void setOperator(String operator) 
    {
        this.operator = operator;
    }

    public String getOperator() 
    {
        return operator;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("alarmDefineId", getAlarmDefineId())
            .append("accCount", getAccCount())
            .append("accTime", getAccTime())
            .append("calculateExpress", getCalculateExpress())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .append("operator", getOperator())
            .toString();
    }
}
